package com.ruoyi.document.service.impl;

import com.ruoyi.document.dao.DocHighBankContentDao;
import com.ruoyi.document.domain.DocHighBankContent;
import com.ruoyi.document.mapper.DocHighBankMapper;
import com.ruoyi.document.service.DocHighBankContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DocHighBankContentServiceImpl implements DocHighBankContentService {
    @Autowired
    private DocHighBankContentDao repository;
    @Override
    public void saveContent(DocHighBankContent docHighBankContent) {
        repository.save(docHighBankContent);
    }

    @Override
    public void updateContent(DocHighBankContent docHighBankContent) {
        repository.save(docHighBankContent);
    }

    @Override
    public void deleteContentById(String id) {
        repository.deleteById(id);
    }

    @Override
    public List<DocHighBankContent> findContentList() {
        return repository.findAll();
    }

    @Override
    public DocHighBankContent findContentById(String id) {
        return repository.findById(id).get();
    }
}
